package com.yfp.operation.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @Description: 商城商品
 *
 * @CreateDate: 2025/2/24 15:01
 * @UpdateUser:
 * @UpdateDate: 2025/2/24 15:01
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@TableName(value ="mall_product")
@Data
public class MallProduct implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @Schema(description="商品名称")
    private String productName;
    @Schema(description="商品价格")
    private BigDecimal price;
    @Schema(description="库存")
    private Integer inventory;
    @Schema(description="产品说明")
    private String productInstructions;
    @Schema(description="购买说明")
    private String buyInstructions;
    @Schema(description="使用规则")
    private String useRule;
    @Schema(description="商品图片")
    private String productImg;
    @Schema(description="商品详情主图")
    private String productHeadimg;
    @Schema(description="商品详情图")
    private String productInfoimg;
    @Schema(description="部门ID（数据权限使用）")
    private Long deptId;
    @Schema(description = "城市名称")
    private String cityName;
    @Schema(description = "创建用户")
    private Long createUserId;
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;
    @Schema(description = "编辑用户")
    private Long updateUserId;
    @Schema(description = "编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;
    @Schema(description = "状态0删除1待上架2已上架3已下架")
    private Integer status;
    @Schema(description = "优先级")
    private Integer sort;
    @Schema(description = "类型：1现金支付2积分兑换3现金+积分")
    private Integer type;
    @Schema(description = "积分")
    private Long integral;
    @Schema(description = "库存-可售卖")
    private Integer currentInventory;
    @Schema(description = "已售数量")
    private Integer soldOut;
    @Schema(description = "完成订单数")
    private Integer finishCount;
    @Schema(description = "退款退货数")
    private Integer returnGoodsCount;
    @Schema(description = "仅退款数")
    private Integer refundCount;

}
